<template>
  <div class="dy-main">
    <div class="dy-header">
      <x-header :right-options="{showMore: true}" :left-options="{preventGoBack:true}" @on-click-back="back" @on-click-more="showMenus = true">标题</x-header>
    </div>
    <div class="dy-body">
      <div class="dy-wapper">
        <scroller lock-x>
          <div class="scroller-box">
            <div class="my-upfile-img-test">
              <zx-fileImg v-model="imga" :img="imga" @click.native="clickUpfileimg"></zx-fileImg>
              <div style="height:0.2rem;"></div>
              <zx-fileImg v-model="imgb" :img="imgb"></zx-fileImg>
            </div>
          </div>
        </scroller>
        <actionsheet v-show="showList" v-model="showList" :menus="data" @on-click-menu="setValue" show-cancel></actionsheet>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  mounted () {
  },
  methods: {
    back () {
      this.$publicFun.goBack(this)
    },
    clickUpfileimg () {
      this.showList = !this.showList
    },
    setValue (val) {
      // console.log(val)
      this.imga = this.imgb
    }
  },
  data () {
    return {
      imgb: 'https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=1438475101,354016904&fm=58',
      imga: require('../../assets/img/upfileimg.png'),
      data: {menu1: '拍照', menu2: '从相册选取'},
      showList: false
    }
  },
  watch: { }
}
</script>
<style>
.my-upfile-img-test { padding:0.3rem;}
</style>
